1. Field
The present disclosure relates generally to streaming media, and more specifically to switching streaming media quality in response to bandwidth changes.
2. Background
Adaptive bandwidth switching (or adaptive bitrate streaming) detects a user's bandwidth and CPU capacity in real time and adjusts the quality of a video stream or other media stream accordingly. The original media file is encoded at different bitrates and stored as multiple playlists where each playlist references a different quality encoding of the original media file split into “segments.” As the stream is played, the client can select from these alternate streams allowing the stream to adapt to the available network and processor resources. APPLE's HTTP Live Streaming (HLS) protocol is one example of an adaptive bandwidth switching protocol and is implemented in QUICK TIME and the ANDROID OS. MPEG-DASH, ADOBE DYNAMIC STREAMING for FLASH, and MICROSOFT's SMOOTH STREAMING are other examples of adaptive bandwidth switching protocols.
Traditional protocols account for changes in network bandwidth by monitoring the network bandwidth in between downloading segments and requesting a lower-quality stream if the available bandwidth substantially decreases (e.g., where a mobile device loses a WIFI connection and switches to a congested 3G network). One problem with such methods is that the bandwidth sometimes decreases during a segment download, where segments often correspond to 10 seconds of media and hence many megabytes of data must be downloaded before stream switching can occur. When this happens, a high quality segment may be stuck downloading on a low-bandwidth connection thus leading to stalling of media playback.
FIG. 1 illustrates a variant playlist and the files that each variant in the variant playlist refers to. The variant playlist 100 includes a plurality of playlists (or variants) 102, 104, 106, which each reference a first file 108, a second file 110, and a third file 112, respectively. These references are made via respective links 114, 116, 118 that indicate a location in memory where the first, second, and third files 108, 110, 112 can be accessed. The links 114, 116, 118 may also indicate what device or virtual device the first, second, and third files 108, 110, 112 are stored on. Each of the files 108, 110, 112 is an encoding of an original media file at different quality levels (e.g., different bitrates). For instance, the first file 108 can be encoded at a lowest quality (e.g., 1 mb/s), the third file 112 can be encoded at a highest quality (e.g., 6 mb/s), and the second file 110 can be encoded at a middle quality (e.g., 3 mb/s) in between that of the first and third files 108, 112. Each of the three files 108, 110, 112 is separated into six segments corresponding to equal periods or equal file sizes within the original media file.
FIG. 2 illustrates a method of adaptive bandwidth switching as known in the art. The method 200 begins by determining a bandwidth available for downloading a segment of a streaming media file in a determine available bandwidth operation 204. Given different qualities of the streaming media file, such as the first, second, and third files 106, 108, 110 in FIG. 1, a selection operation 206 selects a stream or variant that corresponds to the bandwidth identified in the determine available bandwidth operation 204. A download segment operation 208 proceeds to download sequential segments of the selected variant, for instance, a lowest quality file (e.g., 106). After the first segment has been received, a streaming complete determination 210 determines if the streaming media file has completed streaming. If so, the method 200 ends.
If not, the method 200 returns to the determine available bandwidth operation 204 and determines the available bandwidth. The selection operation 206 again selects a stream that corresponds to the bandwidth; if the bandwidth has not significantly changed, then the selection operation 206 selects the same stream as before, but if the bandwidth has significantly changed, then the selection operation 206 selects a different stream. This process continues until the streaming complete determination 210 determines that the streaming is complete.
Trouble arises when the bandwidth decreases substantially during the download segment operation 208 causing a higher quality segment to attempt network traversal when there are insufficient network resources. Current methods are unable to interrupt the download segment operation 208, so the download of the segment continues even if this process takes many seconds, minutes, or is indefinite. Although the segment may eventually complete downloading, the user experiences a choppy or even stalled media stream.
There is therefore a need for systems and methods able to perform adaptive bandwidth switching without the stalling caused by bandwidth changes that occur during the download segment operation 208.